package pl.easyshop.core.common.validation.validator;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

import pl.easyshop.core.common.validation.annotations.NotBlank;


public class NotBlankValidator implements ConstraintValidator<NotBlank, String> {

	public void initialize(NotBlank notBlank) {
		
	}

	public boolean isValid(String object, ConstraintValidatorContext constraintContext) {
		return (object!=null) && (object.trim().length()>0);
	}

}